<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        *{
            margin: 0;
            padding: 0;
        }
        ul{
            list-style: none;
        }
        ul li div{
            width: 100px;
            height: 40px;
            background-color: pink;
            margin: 5px 5px;
            float: left;
            text-align: center;
            line-height: 40px;
        }
    </style>
</head>
<body>
    <ul>
        <li>
            <div>1</div>
        </li>
        <li>
            <div>2</div>
        </li>
        <li>
            <div>3</div>
        </li>
        <li>
            <div>4</div>
        </li>
        <li>
            <div>5</div>
        </li>
    </ul>
</body>
<script src="./jquery.js"></script>
<script>
    $(function(){
        $('div').click(function(){
            $(this).css('backgroundColor','skyblue').parent().siblings($('li')).children().css('backgroundColor','pink')
        })


    })
</script>
</html>